
OBJDIR := ./obj/

BINDIR := ./bin/

INCLUDEDIR := ./include

SRC := $(wildcard *.c)
OBJS := $(patsubst %.c,%.o,$(SRC))

OBJTARGETS := $(foreach obj,$(OBJS),$(OBJDIR)/$(obj))

all: myws

myws: $(OBJTARGETS) $(BINDIR)/myws


$(OBJDIR)/%.o:%.c
	$(CC) -c $(COMPILERCFLAGS) -I $(INCLUDEDIR) -o $@ $<

$(BINDIR)/myws : $(OBJTARGETS)
	$(CC) $(LINKFLAGS)  $(OBJTARGETS) -o $@
